url = location.href;
    $.ajax({
        type: "get",
        url: "http://www.ffepcn.com/ThinkPHP/Library/Vendor/WXAPI/jssdk.php?url=" + url, //替换网址，xxx根据自己jssdk文件位置修改 
        dataType: "jsonp",
        jsonp: "callback",
        jsonpCallback: "success_jsonpCallback",
        success: function (data) {
            wx.config({
                debug: false,
                appId: data.appId,
                timestamp: data.timestamp,
                nonceStr: data.nonceStr,
                signature: data.signature,
                jsApiList: [
                  "onMenuShareTimeline", //分享给好友 
                  "onMenuShareAppMessage", //分享到朋友圈 
                  "onMenuShareQQ", //分享到QQ 
                  "onMenuShareWeibo", //分享到微博 
                  "chooseImage" //拍照或选择图片接口
                ]
            });
        },
        error: function (data) {
            console.log("连接失败！");
        }
    });
    
    wx.ready(function () {
        var shareData = {
            title: '第41届国际名家具(东莞)展览会 邀请函',
            desc: '您有一份邀请函,请查收，第41届国际名家具(东莞)展览会  时间：2019.3.16-20',  
            link: url,
            imgUrl: 'http://form.ffepcn.com/fullpage/images/wx_log.jpg',

        };
        wx.onMenuShareAppMessage(shareData);
        wx.onMenuShareTimeline(shareData);
        wx.onMenuShareQQ(shareData);
        wx.onMenuShareWeibo(shareData);
        
    });